#include "selectServer.hpp"
#include "err.h"
#include <memory>

static void usage(std::string proc)
{
    std::cout << "Usage:\n\t" << proc << " prot" << "\n\n";
}

std::string transaction(const std::string &request)
{
    return request;
}

int main(int argc, char *argv[])
{
    // if(argc != 2)
    // {
    //     usage(argv[0]);
    //     exit(USAGE_ERR);
    // }

    // unique_ptr<SelectServer> svr(new SelectServer(atoi(argv[1])));

    // std::cout << "test: " << sizeof(fd_set) * 8 << std::endl;
    std::unique_ptr<SelectServer> svr(new SelectServer(transaction));

    svr->initServer();

    svr->start();

    return 0;
}